home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar Extras 3
/
Ex3side1.d64
/
hex convert.s
< prev
next >
Wrap
Text File
|
2022-08-28
|
1KB
|
107 lines
open =$ffc0
readst =$ffb7
setlfs =$ffba
setnam =$ffbd
load =$ffd5
getin =$ffe4
clrchn =$ffcc
close =$ffc3 ;a
chrin =$ffcf
chkout =$ffc9 ;x
chkin =$ffc6 ;x
plot =$fff0
chrout =$ffd2
color'pointer =243
screen'line'pointer =209
print'number =$bdcd ;x,a
clear'line =59903
background =53281
border =53280
unlisten =$ffae
clall =$ffe7
.org $c000
.mem
jsr $aefd
jsr $ad9e
jsr $b7f7
sta high
sty low
convert lda high
and #%11110000
lsr
lsr
lsr
lsr
tay
lda hex,y
sta buffer
lda high
and #%00001111
tay
lda hex,y
sta buffer+1
lda low
and #%11110000
lsr
lsr
lsr
lsr
tay
lda hex,y
sta buffer+2
lda low
and #%00001111
tay
lda hex,y
sta buffer+3
ldy #4
sty hlength
ldx <hex'name
ldy >hex'name
jsr locvar
lda <hlength
ldy >hlength
jmp set'string
locvar lda $7a
pha
lda $7b
pha
stx $7a
sty $7b
jsr $b08b
sta $49
sty $4a
pla
sta $7b
pla
sta $7a
rts
set'string sta $64
sty $65
jmp $aa52
hex'name .asc "hex$":.byt 0
hlength .byt 0
.word buffer
hex .asc "0123456789abcdef"
low .byt 0
high .byt 0
temp .byt 0
counter .byt 0
buffer .buf 4
.end